PostgreSQL PL/pgSQL Debugger provides step-by-step code debugging for PL/pgSQL functions. To launch the debugger, click the
button in the function designer.
You can perform the most commonly used actions for debugging on the toolbar or menu:
Button |
Description |
|
Start running code in debug mode. Enter the Input Parameters if necessary. The debugger executes your code until the end of the code or the next breakpoint is reached. |
|
Stop stepping the code. The execution will stop and cannot resume it. |
|
Resume the execution. The current line will be executed. If the line is a function call, it will bypass the function. The counter will then move to the next line of code. |
|
Resume the execution. The current line will be executed. If the line is a function call, the counter goes to the first statement in the function. Otherwise, the counter will move to the next line of code. |
|
Resume the execution. The remaining part of the code within the current function will be executed. Subsequently, the counter will jump to the line which is just after the caller of the function. |
The Code pane shows the code of the function. You can add/remove breakpoints for debugging by clicking
in the grey area beside each statement.
The Breakpoints pane displays all the breakpoints.
The Call Stack pane displays a list of functions as they are called. To jump to a function, control-click it and select Jump To.
The Local Variables pane displays all local variables and their values. To add a variable to the watch list, control-click it and select Add to Watch List.
The Parameters pane displays the inputted parameters. To add a parameter to the watch list, control-click it and select Add to Watch List.
The Watch List pane displays information about the variables being watched, allows you to delete or edit watch variables. To edit the value of a variable, control-click it and select Set Value. To delete a variable, control-click it and select Remove Variable.
The Log pane displays the message log when debugging the code and the results after the function has completed the execution.